/*
 * XML Type:  WireRequest
 * Namespace: http://ofx.net/types/2003/04
 * Java type: net.ofx.types.x2003.x04.WireRequest
 *
 * Automatically generated - do not modify.
 */
package net.ofx.types.x2003.x04.impl;
/**
 * An XML WireRequest(@http://ofx.net/types/2003/04).
 *
 * This is a complex type.
 */
public class WireRequestImpl extends net.ofx.types.x2003.x04.impl.AbstractWireRequestImpl implements net.ofx.types.x2003.x04.WireRequest
{
    
    public WireRequestImpl(org.apache.xmlbeans.SchemaType sType)
    {
        super(sType);
    }
    
    private static final javax.xml.namespace.QName BANKACCTFROM$0 = 
        new javax.xml.namespace.QName("", "BANKACCTFROM");
    private static final javax.xml.namespace.QName WIREBENEFICIARY$2 = 
        new javax.xml.namespace.QName("", "WIREBENEFICIARY");
    private static final javax.xml.namespace.QName WIREDESTBANK$4 = 
        new javax.xml.namespace.QName("", "WIREDESTBANK");
    private static final javax.xml.namespace.QName TRNAMT$6 = 
        new javax.xml.namespace.QName("", "TRNAMT");
    private static final javax.xml.namespace.QName DTDUE$8 = 
        new javax.xml.namespace.QName("", "DTDUE");
    private static final javax.xml.namespace.QName PAYINSTRUCT$10 = 
        new javax.xml.namespace.QName("", "PAYINSTRUCT");
    
    
    /**
     * Gets the "BANKACCTFROM" element
     */
    public net.ofx.types.x2003.x04.BankAccount getBANKACCTFROM()
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.BankAccount target = null;
            target = (net.ofx.types.x2003.x04.BankAccount)get_store().find_element_user(BANKACCTFROM$0, 0);
            if (target == null)
            {
                return null;
            }
            return target;
        }
    }
    
    /**
     * Sets the "BANKACCTFROM" element
     */
    public void setBANKACCTFROM(net.ofx.types.x2003.x04.BankAccount bankacctfrom)
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.BankAccount target = null;
            target = (net.ofx.types.x2003.x04.BankAccount)get_store().find_element_user(BANKACCTFROM$0, 0);
            if (target == null)
            {
                target = (net.ofx.types.x2003.x04.BankAccount)get_store().add_element_user(BANKACCTFROM$0);
            }
            target.set(bankacctfrom);
        }
    }
    
    /**
     * Appends and returns a new empty "BANKACCTFROM" element
     */
    public net.ofx.types.x2003.x04.BankAccount addNewBANKACCTFROM()
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.BankAccount target = null;
            target = (net.ofx.types.x2003.x04.BankAccount)get_store().add_element_user(BANKACCTFROM$0);
            return target;
        }
    }
    
    /**
     * Gets the "WIREBENEFICIARY" element
     */
    public net.ofx.types.x2003.x04.WireBeneficiary getWIREBENEFICIARY()
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.WireBeneficiary target = null;
            target = (net.ofx.types.x2003.x04.WireBeneficiary)get_store().find_element_user(WIREBENEFICIARY$2, 0);
            if (target == null)
            {
                return null;
            }
            return target;
        }
    }
    
    /**
     * Sets the "WIREBENEFICIARY" element
     */
    public void setWIREBENEFICIARY(net.ofx.types.x2003.x04.WireBeneficiary wirebeneficiary)
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.WireBeneficiary target = null;
            target = (net.ofx.types.x2003.x04.WireBeneficiary)get_store().find_element_user(WIREBENEFICIARY$2, 0);
            if (target == null)
            {
                target = (net.ofx.types.x2003.x04.WireBeneficiary)get_store().add_element_user(WIREBENEFICIARY$2);
            }
            target.set(wirebeneficiary);
        }
    }
    
    /**
     * Appends and returns a new empty "WIREBENEFICIARY" element
     */
    public net.ofx.types.x2003.x04.WireBeneficiary addNewWIREBENEFICIARY()
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.WireBeneficiary target = null;
            target = (net.ofx.types.x2003.x04.WireBeneficiary)get_store().add_element_user(WIREBENEFICIARY$2);
            return target;
        }
    }
    
    /**
     * Gets the "WIREDESTBANK" element
     */
    public net.ofx.types.x2003.x04.WireDestinationBank getWIREDESTBANK()
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.WireDestinationBank target = null;
            target = (net.ofx.types.x2003.x04.WireDestinationBank)get_store().find_element_user(WIREDESTBANK$4, 0);
            if (target == null)
            {
                return null;
            }
            return target;
        }
    }
    
    /**
     * True if has "WIREDESTBANK" element
     */
    public boolean isSetWIREDESTBANK()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().count_elements(WIREDESTBANK$4) != 0;
        }
    }
    
    /**
     * Sets the "WIREDESTBANK" element
     */
    public void setWIREDESTBANK(net.ofx.types.x2003.x04.WireDestinationBank wiredestbank)
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.WireDestinationBank target = null;
            target = (net.ofx.types.x2003.x04.WireDestinationBank)get_store().find_element_user(WIREDESTBANK$4, 0);
            if (target == null)
            {
                target = (net.ofx.types.x2003.x04.WireDestinationBank)get_store().add_element_user(WIREDESTBANK$4);
            }
            target.set(wiredestbank);
        }
    }
    
    /**
     * Appends and returns a new empty "WIREDESTBANK" element
     */
    public net.ofx.types.x2003.x04.WireDestinationBank addNewWIREDESTBANK()
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.WireDestinationBank target = null;
            target = (net.ofx.types.x2003.x04.WireDestinationBank)get_store().add_element_user(WIREDESTBANK$4);
            return target;
        }
    }
    
    /**
     * Unsets the "WIREDESTBANK" element
     */
    public void unsetWIREDESTBANK()
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_element(WIREDESTBANK$4, 0);
        }
    }
    
    /**
     * Gets the "TRNAMT" element
     */
    public java.lang.String getTRNAMT()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(TRNAMT$6, 0);
            if (target == null)
            {
                return null;
            }
            return target.getStringValue();
        }
    }
    
    /**
     * Gets (as xml) the "TRNAMT" element
     */
    public net.ofx.types.x2003.x04.AmountType xgetTRNAMT()
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.AmountType target = null;
            target = (net.ofx.types.x2003.x04.AmountType)get_store().find_element_user(TRNAMT$6, 0);
            return target;
        }
    }
    
    /**
     * Sets the "TRNAMT" element
     */
    public void setTRNAMT(java.lang.String trnamt)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(TRNAMT$6, 0);
            if (target == null)
            {
                target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(TRNAMT$6);
            }
            target.setStringValue(trnamt);
        }
    }
    
    /**
     * Sets (as xml) the "TRNAMT" element
     */
    public void xsetTRNAMT(net.ofx.types.x2003.x04.AmountType trnamt)
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.AmountType target = null;
            target = (net.ofx.types.x2003.x04.AmountType)get_store().find_element_user(TRNAMT$6, 0);
            if (target == null)
            {
                target = (net.ofx.types.x2003.x04.AmountType)get_store().add_element_user(TRNAMT$6);
            }
            target.set(trnamt);
        }
    }
    
    /**
     * Gets the "DTDUE" element
     */
    public java.lang.String getDTDUE()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(DTDUE$8, 0);
            if (target == null)
            {
                return null;
            }
            return target.getStringValue();
        }
    }
    
    /**
     * Gets (as xml) the "DTDUE" element
     */
    public net.ofx.types.x2003.x04.DateTimeType xgetDTDUE()
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.DateTimeType target = null;
            target = (net.ofx.types.x2003.x04.DateTimeType)get_store().find_element_user(DTDUE$8, 0);
            return target;
        }
    }
    
    /**
     * True if has "DTDUE" element
     */
    public boolean isSetDTDUE()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().count_elements(DTDUE$8) != 0;
        }
    }
    
    /**
     * Sets the "DTDUE" element
     */
    public void setDTDUE(java.lang.String dtdue)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(DTDUE$8, 0);
            if (target == null)
            {
                target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(DTDUE$8);
            }
            target.setStringValue(dtdue);
        }
    }
    
    /**
     * Sets (as xml) the "DTDUE" element
     */
    public void xsetDTDUE(net.ofx.types.x2003.x04.DateTimeType dtdue)
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.DateTimeType target = null;
            target = (net.ofx.types.x2003.x04.DateTimeType)get_store().find_element_user(DTDUE$8, 0);
            if (target == null)
            {
                target = (net.ofx.types.x2003.x04.DateTimeType)get_store().add_element_user(DTDUE$8);
            }
            target.set(dtdue);
        }
    }
    
    /**
     * Unsets the "DTDUE" element
     */
    public void unsetDTDUE()
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_element(DTDUE$8, 0);
        }
    }
    
    /**
     * Gets the "PAYINSTRUCT" element
     */
    public java.lang.String getPAYINSTRUCT()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(PAYINSTRUCT$10, 0);
            if (target == null)
            {
                return null;
            }
            return target.getStringValue();
        }
    }
    
    /**
     * Gets (as xml) the "PAYINSTRUCT" element
     */
    public net.ofx.types.x2003.x04.MessageType xgetPAYINSTRUCT()
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.MessageType target = null;
            target = (net.ofx.types.x2003.x04.MessageType)get_store().find_element_user(PAYINSTRUCT$10, 0);
            return target;
        }
    }
    
    /**
     * True if has "PAYINSTRUCT" element
     */
    public boolean isSetPAYINSTRUCT()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().count_elements(PAYINSTRUCT$10) != 0;
        }
    }
    
    /**
     * Sets the "PAYINSTRUCT" element
     */
    public void setPAYINSTRUCT(java.lang.String payinstruct)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(PAYINSTRUCT$10, 0);
            if (target == null)
            {
                target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(PAYINSTRUCT$10);
            }
            target.setStringValue(payinstruct);
        }
    }
    
    /**
     * Sets (as xml) the "PAYINSTRUCT" element
     */
    public void xsetPAYINSTRUCT(net.ofx.types.x2003.x04.MessageType payinstruct)
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.MessageType target = null;
            target = (net.ofx.types.x2003.x04.MessageType)get_store().find_element_user(PAYINSTRUCT$10, 0);
            if (target == null)
            {
                target = (net.ofx.types.x2003.x04.MessageType)get_store().add_element_user(PAYINSTRUCT$10);
            }
            target.set(payinstruct);
        }
    }
    
    /**
     * Unsets the "PAYINSTRUCT" element
     */
    public void unsetPAYINSTRUCT()
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_element(PAYINSTRUCT$10, 0);
        }
    }
}
